# -*- coding: utf-8 -*-

# from urllib.request import urlopen
# from bs4 import BeautifulSoup
from selenium import webdriver
import csv
from selenium.common.exceptions import NoSuchElementException
import datetime
from time import sleep

# csv_file = open("result.csv", "w", newline='')
# writer = csv.writer(csv_file)
# writer.writerow(['name', 'price', 'vip_price', 'count'])

# url = 'https://coll.jd.com/list.html?sub=39866&delivery=0&page=0&JL=4_10_0'

# 浏览器参数，有无优化？！
chrome_options = webdriver.ChromeOptions()
# chrome_options.add_argument('--headless')
# chrome_options.add_argument('--disable-gpu')
# chrome_options.set_headless()
prefs = {'profile.default_content_settings.popups': 0, 'download.default_directory': 'I:\\'}
chrome_options.add_experimental_option('prefs', prefs)
driver = webdriver.Chrome(executable_path=r"D:\Python\Python37\Scripts\chromedriver.exe", chrome_options=chrome_options)

driver.get('http://app.hicloud.com/')
el = driver.find_element_by_class_name("lay-right").find_element_by_class_name("btn-mini").click()

# print(el.text)
# 
# sleep(3)
